package cn.bgs.controller;


import cn.bgs.common.R;
import cn.bgs.pojo.InvestmentPolicy;
import cn.bgs.service.InvestmentPolicyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 招商政策表 前端控制器
 * </p>
 *
 * @author Mr.Zhao
 * @since 2022-08-08
 */
@RestController
@RequestMapping("/investment-policy")
public class InvestmentPolicyController {

    @Autowired
    private InvestmentPolicyService investmentPolicyService;

    @GetMapping("/findInvestmentPolicy")
    public R findInvestmentPolicy(@RequestParam String inPoInfo,@RequestParam String inPoCompany){
        return investmentPolicyService.findInvestmentPolicy(inPoInfo, inPoCompany);
    }

    @GetMapping("/findInvestmentPolicyId")
    public R findInvestmentPolicyId(Integer id){
        return investmentPolicyService.findInvestmentPolicyId(id);
    }

    @GetMapping("/delInvestmentPolicy")
    public R delInvestmentPolicy(@RequestParam Integer id){
        return investmentPolicyService.delInvestmentPolicy(id);
    }

    @PostMapping("/addInvestmentPolicy")
    public R addInvestmentPolicy(@RequestBody InvestmentPolicy investmentPolicy){
        return investmentPolicyService.addInvestmentPolicy(investmentPolicy);
    }

    @PostMapping("/updateInvestmentPolicy")
    public R updateInvestmentPolicy(@RequestBody InvestmentPolicy investmentPolicy){
        return investmentPolicyService.updateInvestmentPolicy(investmentPolicy);
    }
}

